package cn.edu.nbpt.campus_api.mapper.blog;

import cn.edu.nbpt.campus_api.model.Page;
import cn.edu.nbpt.campus_api.model.blog.entity.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Mapper
public interface ArticleMapper {

    List<Article> selectArticleList(@Param("title") String title,
                                    @Param("state") Integer state,
                                    @Param("author") String author,
                                    @Param("categoryId") Integer categoryId,
                                    @Param("publishStartTime") LocalDate publishStartTime,
                                    @Param("publishEndTime") LocalDate publishEndTime);

    Article selectArticle(Integer id);

    Integer insertArticle(Article article);

    Integer updateArticle(Article article);

    Integer deleteArticle(List<Integer> ids);
}
